﻿using System;
using System.Collections.Generic;
using System.Text;

namespace BBMS.BLL.DataContract
{
    public class ProviderData
    {
        public string Code { set; get; }
        public string Name { set; get; }
        public string Address { set; get; }
        public string City { set; get; }
        public string Phone { set; get; }
        public string Fax { set; get; }
        public string Representative { set; get; }
        public string Tax { set; get; }
        public string MainItem { set; get; }
        public DateTime OpenDate { set; get; }
        public string Status { set; get; }
        public bool Temporary { set; get; }
        public decimal DebtLimit { set; get; }
        public int Priority { set; get; }

        public ProviderData(){}

        public ProviderData(string code, string name, string address, string city, string phone, string fax, string repre, string tax, string mainitem, DateTime opendate, string status, bool temp, int priority)
        {
            this.Code = code;
            this.Name = name;
            this.Address = address;
            this.City = city;
            this.Phone = phone;
            this.Fax = fax;
            this.MainItem = mainitem;
            this.OpenDate = opendate;
            this.Status = status;
            this.Temporary = temp;
            this.Priority = priority;
        }

        public override bool Equals(object obj)
        {
            return ((ProviderData)obj).Code.Equals(this.Code);
        }
    }
}
